package com.bbx.taxi.client.Util;

import android.view.View;

/**
 * @Path com.bbx.taxi.client.Util.MeasureView.java
 * @Author 严旭文
 * @Date 2016-7-26 下午2:45:45
 * @Company 蓝海（福建）信息技术有限公司
 * @Description 
 * 使用测量方法，计算大小
 */
public class MeasureViewUtils {
	public static int getMeasuredHeight(View v) {

		int height = View.MeasureSpec.makeMeasureSpec(0,
				View.MeasureSpec.UNSPECIFIED);
		v.measure(0, height);
       return v.getMeasuredHeight();
	}
	public static int getMeasuredWidth(View v) {
		int width = View.MeasureSpec.makeMeasureSpec(0,
				View.MeasureSpec.UNSPECIFIED);
		v.measure(width, 0);
       return v.getMeasuredWidth();
	}
}
